Tangoe Telecom SOAP API

(0 reviews)

> Cost Center


addCostCenter()

The method adds a new cost center into the database using the provided fields from CostCenterDetails object. The result of the operation is an object represented by a code and a message that provides details about the success of the operation. Also the ID of the newly added cost center is returned as part of the response object. The cost center is not created if another one with the same cost center number already exists. The structure of the used objects may be observed in the appendix section of this document. The format of the request and response messages is the following:

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.asentinel.com/asentinelws/schemas/invord">
   <soapenv:Header/>
   <soapenv:Body>
      <inv:AddCostCenterRequest>
         <inv:costCenter>
            <!--You may enter the following 26 items in any order-->
            <!--Optional:-->
            <inv:costCenterID>?</inv:costCenterID>
            <!--Optional:-->
            <inv:costCenterNo>?</inv:costCenterNo>
            <!--Optional:-->
            <inv:costCenterName>?</inv:costCenterName>
            <!--Optional:-->
            <inv:level1>?</inv:level1>
            <!--Optional:-->
            <inv:level2>?</inv:level2>
            <!--Optional:-->
            <inv:level3>?</inv:level3>
            <!--Optional:-->
            <inv:level4>?</inv:level4>
            <!--Optional:-->
            <inv:level5>?</inv:level5>
            <!--Optional:-->
            <inv:level6>?</inv:level6>
            <!--Optional:-->
            <inv:level7>?</inv:level7>
            <!--Optional:-->
            <inv:level8>?</inv:level8>
            <!--Optional:-->
            <inv:level9>?</inv:level9>
            <!--Optional:-->
            <inv:address>?</inv:address>
            <!--Optional:-->
            <inv:city>?</inv:city>
            <!--Optional:-->
            <inv:state>?</inv:state>
            <!--Optional:-->
            <inv:zip>?</inv:zip>
            <!--Optional:-->
            <inv:country>?</inv:country>
            <!--Optional:-->
            <inv:manager>?</inv:manager>
            <!--Optional:-->
            <inv:phone>?</inv:phone>
            <!--Optional:-->
            <inv:fax>?</inv:fax>
            <!--Optional:-->
            <inv:email>?</inv:email>
            <!--Optional:-->
            <inv:totalEmployees>?</inv:totalEmployees>
            <!--Optional:-->
            <inv:phoneLines>?</inv:phoneLines>
            <!--Optional:-->
            <inv:closed>?</inv:closed>
            <!--Optional:-->
            <inv:customFields>
               <!--Zero or more repetitions:-->
               <inv:customField>
                  <!--Optional:-->
                  <inv:id>?</inv:id>
                  <inv:name>?</inv:name>
                  <inv:value>?</inv:value>
                  <!--Optional:-->
                  <inv:fieldType>?</inv:fieldType>
                  <!--Optional:-->
                  <inv:required>?</inv:required>
               </inv:customField>
            </inv:customFields>
            <!--Optional:-->
            <inv:comments>?</inv:comments>
         </inv:costCenter>
      </inv:AddCostCenterRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.asentinel.com/asentinelws/schemas/invord">
   <soapenv:Header/>
   <soapenv:Body>
      <inv:AddCostCenterResponse>
         <!--Optional:-->
         <inv:costCenterID>?</inv:costCenterID>
         <inv:result>
            <!--You may enter the following 2 items in any order-->
            <inv:code>?</inv:code>
            <!--Optional:-->
            <inv:message>?</inv:message>
         </inv:result>
      </inv:AddCostCenterResponse>
   </soapenv:Body>
</soapenv:Envelope>

Notes:

  • Inside the provided cost center object, costCenterNo and closed fields must always be provided.
  • It is possible to have required custom fields, in which case values for these fields must be provided;
  • The following elements accept only particular values:
    • costCenterNo – a non existing cost center;
    • email – a string representing an email address.
  • If closed is true, the cost center is inactive, otherwise is active;
  • If the value of a custom field of boolean type is not provided, it will default to false;
  • If the value of a custom field of integer type is not provided, it will default to zero (0);
  • If the value of a custom field of double type is not provided, it will default to zero (0);
  • The value of a boolean custom field is specified as 0 (false) or 1 (true);

Errors:

  • Message validation error - SOAP fault message (see dedicated section for more details);
  • Data validation error – situations:
  • costCenterNo is not provided (as it is considered compulsory).
    • closed is not provided (as it is considered compulsory).
    • there is already a cost center with the provided costCenterNo;
    • one of the particular fields _(costCenterNo, email) _contains invalid data;
    • a custom field contains an invalid value – an option that does not exist fora combo type one, a string represented different from mm/dd/yyyy for a date one, a string that does not represent an integer for an integer one, a string that does not represent a double for a double one, a string different from 0 or 1 for a Boolean one;
    • a custom field that is required is not provided;
    • a custom field does not exist for the provided cost center;
  • Operation error, if a database error occurs.

editCostCenter()

The method updates the cost center with the data provided in the CostCenterDetails object. The result of the operation is an object represented by a code and a message that provides details about the success of the operation. The structure of the used objects may be observed in the appendix section of this document. The format of the request and response messages is the following:

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.asentinel.com/asentinelws/schemas/invord">
   <soapenv:Header/>
   <soapenv:Body>
      <inv:EditCostCenterRequest>
         <inv:costCenter>
            <!--You may enter the following 26 items in any order-->
            <!--Optional:-->
            <inv:costCenterID>?</inv:costCenterID>
            <!--Optional:-->
            <inv:costCenterNo>?</inv:costCenterNo>
            <!--Optional:-->
            <inv:costCenterName>?</inv:costCenterName>
            <!--Optional:-->
            <inv:level1>?</inv:level1>
            <!--Optional:-->
            <inv:level2>?</inv:level2>
            <!--Optional:-->
            <inv:level3>?</inv:level3>
            <!--Optional:-->
            <inv:level4>?</inv:level4>
            <!--Optional:-->
            <inv:level5>?</inv:level5>
            <!--Optional:-->
            <inv:level6>?</inv:level6>
            <!--Optional:-->
            <inv:level7>?</inv:level7>
            <!--Optional:-->
            <inv:level8>?</inv:level8>
            <!--Optional:-->
            <inv:level9>?</inv:level9>
            <!--Optional:-->
            <inv:address>?</inv:address>
            <!--Optional:-->
            <inv:city>?</inv:city>
            <!--Optional:-->
            <inv:state>?</inv:state>
            <!--Optional:-->
            <inv:zip>?</inv:zip>
            <!--Optional:-->
            <inv:country>?</inv:country>
            <!--Optional:-->
            <inv:manager>?</inv:manager>
            <!--Optional:-->
            <inv:phone>?</inv:phone>
            <!--Optional:-->
            <inv:fax>?</inv:fax>
            <!--Optional:-->
            <inv:email>?</inv:email>
            <!--Optional:-->
            <inv:totalEmployees>?</inv:totalEmployees>
            <!--Optional:-->
            <inv:phoneLines>?</inv:phoneLines>
            <!--Optional:-->
            <inv:closed>?</inv:closed>
            <!--Optional:-->
            <inv:customFields>
               <!--Zero or more repetitions:-->
               <inv:customField>
                  <!--Optional:-->
                  <inv:id>?</inv:id>
                  <inv:name>?</inv:name>
                  <inv:value>?</inv:value>
                  <!--Optional:-->
                  <inv:fieldType>?</inv:fieldType>
                  <!--Optional:-->
                  <inv:required>?</inv:required>
               </inv:customField>
            </inv:customFields>
            <!--Optional:-->
            <inv:comments>?</inv:comments>
         </inv:costCenter>
      </inv:EditCostCenterRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.asentinel.com/asentinelws/schemas/invord">
   <soapenv:Header/>
   <soapenv:Body>
      <inv:EditCostCenterResponse>
         <inv:result>
            <!--You may enter the following 2 items in any order-->
            <inv:code>?</inv:code>
            <!--Optional:-->
            <inv:message>?</inv:message>
         </inv:result>
      </inv:EditCostCenterResponse>
   </soapenv:Body>
</soapenv:Envelope>

Notes:

  • The cost center that is edited is determined based on the provided costCenterNo;
  • Inside the provided cost center, the costCenterNo must always be provided;
  • The following elements accept only particular values:
    • costCenterNo – an existing cost center number;
    • email – a string representing an email address.
  • If closed is true, the cost center is inactive, otherwise is active;
  • Cost center number cannot be edited;
  • Only the provided fields as part of the request are edited. The rest of the fields remainas they were before the start of the operation;
  • The user that is associated with this operation must be set in the TIMS.properties file.

Errors:

  • Message validation error - SOAP fault message (see dedicated section for more details);
  • Data validation error – situations:
  • the user id from the properties file was not set correctly;
    • the costCenterNo does not exist;
    • one of the particular fields (costCenterNo,email) contains invalid data;
    • a custom field contains an invalid value – an option that does not exist fora combo type one, a string represented different from mm/dd/yyyy for a date one, a string that does not represent an integer for an integer one, a string that does not represent a double for a double one, a string different from 0 or 1 for a boolean one;
    • a custom field does not exist for the provided cost center.
  • Operation error, if a database error occurs.

findCostCenter()

The method queries the database for cost centers using as filter the elements provided in the _CostCenterDetails _object. Together with the filter, a maximum number of returned items may be included in the request. If this is not present, all found records are returned from the database. The result of the operation is a list with zero or more cost centers that match the provided filter and an object represented by a code and a message with details about the success of the operation. The structure of the used objects may be observed in appendix section of this document. The format of the request and response messages is the following:

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.asentinel.com/asentinelws/schemas/invord">
   <soapenv:Header/>
   <soapenv:Body>
      <inv:FindCostCenterRequest>
         <inv:costCenter>
            <!--You may enter the following 26 items in any order-->
            <!--Optional:-->
            <inv:costCenterID>?</inv:costCenterID>
            <!--Optional:-->
            <inv:costCenterNo>?</inv:costCenterNo>
            <!--Optional:-->
            <inv:costCenterName>?</inv:costCenterName>
            <!--Optional:-->
            <inv:level1>?</inv:level1>
            <!--Optional:-->
            <inv:level2>?</inv:level2>
            <!--Optional:-->
            <inv:level3>?</inv:level3>
            <!--Optional:-->
            <inv:level4>?</inv:level4>
            <!--Optional:-->
            <inv:level5>?</inv:level5>
            <!--Optional:-->
            <inv:level6>?</inv:level6>
            <!--Optional:-->
            <inv:level7>?</inv:level7>
            <!--Optional:-->
            <inv:level8>?</inv:level8>
            <!--Optional:-->
            <inv:level9>?</inv:level9>
            <!--Optional:-->
            <inv:address>?</inv:address>
            <!--Optional:-->
            <inv:city>?</inv:city>
            <!--Optional:-->
            <inv:state>?</inv:state>
            <!--Optional:-->
            <inv:zip>?</inv:zip>
            <!--Optional:-->
            <inv:country>?</inv:country>
            <!--Optional:-->
            <inv:manager>?</inv:manager>
            <!--Optional:-->
            <inv:phone>?</inv:phone>
            <!--Optional:-->
            <inv:fax>?</inv:fax>
            <!--Optional:-->
            <inv:email>?</inv:email>
            <!--Optional:-->
            <inv:totalEmployees>?</inv:totalEmployees>
            <!--Optional:-->
            <inv:phoneLines>?</inv:phoneLines>
            <!--Optional:-->
            <inv:closed>?</inv:closed>
            <!--Optional:-->
            <inv:customFields>
               <!--Zero or more repetitions:-->
               <inv:customField>
                  <!--Optional:-->
                  <inv:id>?</inv:id>
                  <inv:name>?</inv:name>
                  <inv:value>?</inv:value>
                  <!--Optional:-->
                  <inv:fieldType>?</inv:fieldType>
                  <!--Optional:-->
                  <inv:required>?</inv:required>
               </inv:customField>
            </inv:customFields>
            <!--Optional:-->
            <inv:comments>?</inv:comments>
         </inv:costCenter>
         <!--Optional:-->
         <inv:maxNoOfRecords>?</inv:maxNoOfRecords>
      </inv:FindCostCenterRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.asentinel.com/asentinelws/schemas/invord">
   <soapenv:Header/>
   <soapenv:Body>
      <inv:FindCostCenterResponse>
         <!--Zero or more repetitions:-->
         <inv:costCenter>
            <!--You may enter the following 26 items in any order-->
            <!--Optional:-->
            <inv:costCenterID>?</inv:costCenterID>
            <!--Optional:-->
            <inv:costCenterNo>?</inv:costCenterNo>
            <!--Optional:-->
            <inv:costCenterName>?</inv:costCenterName>
            <!--Optional:-->
            <inv:level1>?</inv:level1>
            <!--Optional:-->
            <inv:level2>?</inv:level2>
            <!--Optional:-->
            <inv:level3>?</inv:level3>
            <!--Optional:-->
            <inv:level4>?</inv:level4>
            <!--Optional:-->
            <inv:level5>?</inv:level5>
            <!--Optional:-->
            <inv:level6>?</inv:level6>
            <!--Optional:-->
            <inv:level7>?</inv:level7>
            <!--Optional:-->
            <inv:level8>?</inv:level8>
            <!--Optional:-->
            <inv:level9>?</inv:level9>
            <!--Optional:-->
            <inv:address>?</inv:address>
            <!--Optional:-->
            <inv:city>?</inv:city>
            <!--Optional:-->
            <inv:state>?</inv:state>
            <!--Optional:-->
            <inv:zip>?</inv:zip>
            <!--Optional:-->
            <inv:country>?</inv:country>
            <!--Optional:-->
            <inv:manager>?</inv:manager>
            <!--Optional:-->
            <inv:phone>?</inv:phone>
            <!--Optional:-->
            <inv:fax>?</inv:fax>
            <!--Optional:-->
            <inv:email>?</inv:email>
            <!--Optional:-->
            <inv:totalEmployees>?</inv:totalEmployees>
            <!--Optional:-->
            <inv:phoneLines>?</inv:phoneLines>
            <!--Optional:-->
            <inv:closed>?</inv:closed>
            <!--Optional:-->
            <inv:customFields>
               <!--Zero or more repetitions:-->
               <inv:customField>
                  <!--Optional:-->
                  <inv:id>?</inv:id>
                  <inv:name>?</inv:name>
                  <inv:value>?</inv:value>
                  <!--Optional:-->
                  <inv:fieldType>?</inv:fieldType>
                  <!--Optional:-->
                  <inv:required>?</inv:required>
               </inv:customField>
            </inv:customFields>
            <!--Optional:-->
            <inv:comments>?</inv:comments>
         </inv:costCenter>
         <inv:result>
            <!--You may enter the following 2 items in any order-->
            <inv:code>?</inv:code>
            <!--Optional:-->
            <inv:message>?</inv:message>
         </inv:result>
      </inv:FindCostCenterResponse>
   </soapenv:Body>
</soapenv:Envelope>

Notes:

  • A search filter may contain both standard and custom fields;
  • The value of a boolean custom field is specified as 0 (false) or 1 (true);

Errors:

  • Message validation error - SOAP fault message (see dedicated section for more details);
  • Data validation error – situations:
    • a custom field contains an invalid value – an option that does not exist fora combo type one, a string represented different from mm/dd/yyyy for a date one, a string that does not represent an integer for an integer one, a string that does not represent a double for a double one, a string different from 0 or 1 for a Boolean one;
    • a custom field does not exist for the queried cost center;
  • Operation error, if a database error occurs.

Reviews